<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <META http-equiv="Content-Type" content="text/html; charset=x-user-defined">
    <TITLE>作业排单系统</TITLE>
    <META name="viewport" content="width=device-width">
    <LINK href="/images/core.css" rel="stylesheet" type="text/css">
    <LINK href="/images/favicon.ico" rel="icon" type="image/x-icon">
    <LINK href="/images/touchicon.png" rel="apple-touch-icon">
</head>
<body class="p-home">
<div class="g-hd f-usn">
    <div class="g-in">
        <div class="m-head">
            <!--            <H1><A href="http://pinle/">拼了</A></H1>-->
        </div>
    </div>
</div>
<div class="g-bn f-usn">
    <div class="g-bna">
    </div>
</div>

<div class="g-bd1">
    <div class="g-in">
        <div class="g-box1">
            <div class="g-boxa">
                <div class="g-boxb">
                    <div class="g-boxc">
                        <div class="g-boxd">
                            <div class="m-feature">
                                <H2 class="u-tts"><?php echo lang('index_system_announcement');?></H2>

                                <div class="feature f-cb">
                                    <H3>作业排单系统</H3>

                                    <div class="cnt">
                                        <P>本系统用于作业排单</P>

                                        <P></P>

                                        <P></P>

                                        <P></P>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="g-box2">
            <div class="g-boxa">
                <div class="g-boxb">
                    <div class="g-boxc">
                        <div class="g-boxd">
                            <div class="m-care">
                                <div class="m-hd m-hd-sm">
                                    <div class="more"><a href="javascript:void(0);"></a></div>
                                    <ul>
                                        <li class="z-crt"><a href="javascript:void(0);" id="teach_login_btn">登录</a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="m-form">
                                    <form name="" action="/login/do_login" method="post" id="login_form">
                                        <div class="formitm">
                                            <label class="lab" id="username_tip">工号：</label>

                                            <div class="ipt">
                                                <input type="text" class="u-ipt" name="username" id="username"/>
                                            </div>
                                        </div>
                                        <div class="formitm">
                                            <label class="lab">密码：</label>

                                            <div class="ipt">
                                                <input type="password" class="u-ipt" name="pwd" id="pwd"/>
                                            </div>
                                        </div>
                                        <div class="formitm formitm-1">
                                            <button class="u-btn" type="button" id="login_submit">登 &nbsp; 录</button>
                                        </div>
                                        <input type="hidden" name="role" id="role" value="1"/>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="g-ft">
    <div class="g-in ">
        <div class="m-ft">
            <P>
                <A href="http://pinle/">关于我们</A>
            </P>

            <P>Copyright xx10soft. All Rights Reserved. </P>
        </div>
    </div>
</div>
<script type="text/javascript" src="/javascript/jquery-1.8.0.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/javascript/jquery.xx.placeholder.js" charset="utf-8"></script>
<script type="text/javascript" src="/javascript/jquery.form.js" charset="utf-8"></script>
<script type="text/javascript" src="/javascript/jquery.xx.js" charset="utf-8"></script>
<script type="text/javascript">
    var $username = $("#username");
    var $pwd = $("#pwd");
    var $username_tip = $("#username_tip");
    var $teach_login_btn = $('#teach_login_btn');
    var $student_login_btn = $('#student_login_btn');
    var $role = $('#role');
    var $login_submit = $('#login_submit');
    //   var $login_form = $("#login_form").ajaxform();
    $(function () {
        $("#username, #pwd").placeholder();

        $teach_login_btn.click(function () {
            $student_login_btn.parent("li").removeClass("z-crt");
            $teach_login_btn.parent("li").addClass("z-crt");
            $username_tip.html("工号：");
            $role.val(1);
        });
        $student_login_btn.click(function () {
            $teach_login_btn.parent("li").removeClass("z-crt");
            $student_login_btn.parent("li").addClass("z-crt");
            $username_tip.html("学号：");
            $role.val(2);
        });

        $login_submit.click(function () {

            $("#login_form").ajaxSubmit(function (data) {
                if (data && data.code == 0) {
                    redirection("/admin");
                }
                else {
                    alert(data.msg);
                }
            });
            return false;
        });

        $username.keydown(function (event) {
            if (event.keyCode == 13) { //回车
                $pwd.focus();
            }
        });
        $pwd.keydown(function (event) {
            if (event.keyCode == 13) {
                $login_submit.click();
            }
        });
        $username.focus();
    });
</script>
</body>
</HTML>
